package com.bsh.utils;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;

@Component
@Lazy(false)
public class Constants {

	public static final String DES3_PASSWORD = "1qaz2wsx"; // aes加密密码
	public static final String DES3_ENCODE = "utf-8";

	/**
	 * token校验
	 */
	public static final boolean TOKEN_CHECK = true;
	/**
	 * token过期时间 （单位秒）long
	 */
	public static final long TOKEN_TIMES = 60*60*24 ;
	
	/**
	 * token过期时间 （单位秒）int
	 */
	public static final int TOKEN_TIMES_INT = 60*60*24 ;
	

	/**
	 * 系统异常400
	 */
	public static final String SYS_ERROR = "400";
	/**
	 * 请求成功200
	 */
	public static final String REQ_SUCCESS = "200";
	/**
	 * 请求参数缺少102
	 */
	public static final String REQ_PARAM_MISS = "102";
	/**
	 * 请求参数错误105
	 */
	public static final String REQ_PARAM_ERROR = "105";

	/**
	 * 请求成功
	 */
	public static final String MSG_SUCCESS = "请求成功";
	/**
	 * 请求失败
	 */
	public static final String MSG_FAILED = "请求失败";
	/**
	 * 请求参数缺少
	 */
	public static final String MSG_PARAM_MISS = "请求参数缺少";
	/**
	 * 系统异常
	 */
	public static final String MSG_EXCEPTION = "系统异常";

	/***************************************************************************************************************************************/

	/**
	 * 银生宝接口地址
	 */
	public static final String YSB_PAY_URL = "http://180.166.114.152:18086/auth/page/authPay";
	/**
	 * 前端回调地址
	 */
	public static final String YSB_RESPONSE_URL = "http://192.168.1.100";
	/**
	 * 后台回调地址
	 */
	public static final String YSB_BACK_RESPONSE_URL = "http://192.168.1.100";

	/**
	 * 商户号
	 */
	public static final String YSB_MERCHANT_ACCOUNT_ID = "2120160704163009001";

	/**
	 * 银生宝key
	 */
	public static final String YSB_PRIVATEKEY = "MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAMBC/mknPjV9Wnr6"
			+ "2VRQPcG1/VRD+gkuZMr5p0/MndOAkKIA/Vi7QRhm8aDh1RSs0CKhYO+9adlKlORH"
			+ "0o29fHE8WcZX5kCtV6bSxmbRmF4CsDyahB8ATacz1sZJcdjsxruom9flnJEOr1MN"
			+ "gy8iRMOYXKtED6r5Vqo+TPsNqlI7AgMBAAECgYALCs351Bsqj0yHC6k3wnQJkB5A"
			+ "nLbbmCKJ1dTaLHJUF2o3I79pPTf74s2148KNMW+yzXn3yvUtWa87fTSGl39yF/hz"
			+ "2sSZlfHv5HRUp8NwECWSvcZgpGnh3lXegt3L97RicIVZ7UGbOLmAjoxfRJ/o9Sf0"
			+ "JLEk7EpFBOqzrqhC4QJBAOait5rd46RyeaYcSjJAheN0WD1hp/owYutWPylYaPut"
			+ "D/rezaOCy3swE5DrfzbmIXuHDeAjtyxq56AQTV6Iss8CQQDVZ+cSbP+MVAxdnlaQ"
			+ "Ghm27VhNR5JPqx9E+7WYmNYhgFwtndwar14Jyj82EXFHpp6A4yEE42ivUoGnO9JR"
			+ "jLTVAkEAncDw60oYulPe54L0MTk3G2RqMtoIRrYwAx7EJyik7njqtEMPz2bYfdNd"
			+ "nsOmCUwR3Od80zI6yXP6KN7dvOqtuwJAFypCMQPX8ZmmBfuMFfRfWjYFYc4lGbTP"
			+ "niNcoQXmKJjQaLs8C0GCCboEho/6Jfb2ObNuACPXV0Czhj2+JNALSQJAMvKU2ita"
			+ "boyKy/MrayAtdplGQR3cHqDzSatRjbQgAoXehafI3c81yXYUS0UvMN8FcQ/GCR5Z" + "P40xdasxp1aRlg==";

	public static final String YSB_KEY = "abcde12345";

	/**
	 * beeCloud常量appId
	 */

	static String appId;

	/**
	 * beeCloud常量appSecret
	 */

	static String appSecret;

	public static String getAppId() {
		return appId;
	}

	@Value("${bee.appId}")
	public void setAppId(String appId) {
		Constants.appId = appId;
	}

	public static String getAppSecret() {
		return appSecret;
	}

	@Value("${bee.appSecret}")
	public void setAppSecret(String appSecret) {
		Constants.appSecret = appSecret;
	}

	/**
	 * 分享添加商币数量
	 * 
	 * @author Administrator
	 */
	public static final class shareCloudMoney {
		/**
		 * 微信朋友圈
		 */
		public static final Integer wxpyq = 2;
		/**
		 * 微信好友
		 */
		public static final Integer wxhy = 1;
		/**
		 * 新浪微博
		 */
		public static final Integer xlwb = 1;
		/**
		 * QQ好友
		 */
		public static final Integer qqhy = 1;
		/**
		 * qq空间
		 */
		public static final Integer qqkj = 1;
		/**
		 * 二维码（暂无）
		 */
		public static final Integer ewmfx = 1;
		/**
		 * 最大分享额度
		 */
		public static final Integer mtxe = 5;

	}

	/**
	 * ip注册限制数
	 */
	public static final int IP_REG_TIMES = 5;

	/**
	 * ip登录限制数
	 */
	public static final int IP_LOGIN_TIMES = 5;

	/**
	 * 
	 * 用户银行卡配置
	 *
	 */
	public static final class BANKCARD {
		public static final Integer USERCARDS = 5;
		public static final Integer MERCHANTCARDS = 5;

	}

	/**
	 * 身份认证apikey
	 */
	public static final String ID_API_KEY = "fc819689b1b0d522abfb7df77049d5e6";

	/**
	 * 身份认证url
	 */
	public static final String ID_URL = "http://api.id98.cn/api/idcard";

	public static final String PIC_URL = "";
	/**
	 * 注册时间分界
	 */
	public static final String REG_TIME_LINE ="2016-08-16 00:00:00";
	/**
	 * 
	 * 微信公众号支付
	 *
	 */
	public static final class WX {
		public static final String APP_ID  = "wx37dc608022d668fc";
		public static final String MCH_ID  = "1322674901";
		public static final String DEVICE_INFO  = "WEB";
		public static final String BODY  = "BSHH5PAY";
		public static final String TRADE_TYPE  = "JSAPI";
		public static final String KEY="09689b0395ade8809c92587e64062b17";

	}

	
	
}
